package com.ruoyi.db.pms.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 商品货品对象 pms_goods_product
 *
 * @author ruoyi
 * @date 2020-04-21
 */

@ApiModel("商品货品实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class PmsGoodsProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品货品ID")
    private Long id;

    @ApiModelProperty("商品表的商品ID")
    @Excel(name = "商品表的商品ID")
    @NotBlank(message = "商品表的商品ID不能为空")
    private Long goodsId;

    @ApiModelProperty("商品规格值列表")
    @Excel(name = "商品规格值列表")
    @NotBlank(message = "商品规格值列表不能为空")
    @Size(min = 0, max = 1023, message = "商品规格值列表长度不能超过1023个字符")
    private String specifications;

    @ApiModelProperty("商品货品价格")
    @Excel(name = "商品货品价格")
    @NotBlank(message = "商品货品价格不能为空")
    private BigDecimal price;

    @ApiModelProperty("商品货品数量")
    @Excel(name = "商品货品数量")
    @NotBlank(message = "商品货品数量不能为空")
    private Integer number;

    @ApiModelProperty("商品货品图片")
    @Excel(name = "商品货品图片")
    @Size(min = 0, max = 125, message = "商品货品图片长度不能超过125个字符")
    private String url;

    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime addTime;

    @ApiModelProperty("逻辑删除")
    @Excel(name = "逻辑删除")
    private Integer deleted;

}
